import { createRouter, createWebHashHistory } from 'vue-router';

import driverSetting from '@/layout/driverSetting.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.VITE_BASE_URL),
  routes: [
    {
      path: '/',
      name: 'selectDriver',
      component: () => import('@/views/selectDriver/index.vue'),
    },
    {
      path: '/driverSetting',
      name: 'driverSetting',
      component: driverSetting,
      redirect: '/driverSetting/keyBinding',
      children: [
        {
          path: 'keyBinding',
          name: 'keyBinding',
          component: () => import('@/views/keyBinding/index.vue'),
        },
      ],
    },
  ],
})

export default router;
